//
//  zidingyiViewController.m
//  xb
//
//  Created by 程锦 on 16/3/10.
//  Copyright © 2016年 程锦. All rights reserved.
//

#import "zidingyiViewController.h"
#import "zidingyiTableViewCell.h"
#import "ZDYViewController.h"

@interface zidingyiViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (weak, nonatomic) IBOutlet UITableView *myTableView;

@end

@implementation zidingyiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    UINib *cellNib = [UINib nibWithNibName:NSStringFromClass([zidingyiTableViewCell class]) bundle:nil];
    
    [self.myTableView registerNib:cellNib forCellReuseIdentifier:NSStringFromClass([zidingyiTableViewCell class])];
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 30;
    
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    zidingyiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([zidingyiTableViewCell class]) forIndexPath:indexPath];
    
    
    return cell;
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    ZDYViewController *zdy = [[ZDYViewController alloc] initWithNibName:NSStringFromClass([ZDYViewController class]) bundle:nil];
    
    [self.navigationController pushViewController:zdy animated:YES];
    
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
